import service from '../utils/request'

export default {
    getImgsBySpotId(id) {
        return service(
            {
                url: `spot/findSpotImgById/${id}`,
                method: 'post'
            }
        )
    },
    getSpotById(id) {
        return service(
            {
                url: `spot/findSpotById/${id}`,
                method: 'post'
            }
        )
    },
    getComments(id) {
        return service(
            {
                url: `comment/spxpl/${id}`,
                method: "post"
            }
        )
    },
    findMainImg(id) {
        return service({
                url: `img/findImg/${id}`,
                method: "get"
            }
        )
    },
    //根据分页条件分页景点
    list(pageNum, pageSize, spotQuery) {
        return service({
            url: `/spot/pageListSpot/${pageNum}/${pageSize}`,
            method: 'post',
            data: spotQuery
        })
    },
    getAverageScore(id) {
        return service(
            {
                url: `spot/getSpotScore/${id}`,
                method: "get"
            }
        )
    },
}
